Learn R Programming

adoption (version 0.6.4)

Output of adoption: print and str for the output of the function adoption

Description

"adoption" is an S3 class which indicates the output of the function adoption. The commands print and str give some nice output. The command print additionally returns the output within a list.

Usage

# S3 method for adoption
print(x,..., level=0)
# S3 method for adoption
str(object, ..., give.attr=FALSE)

Arguments

x,object

objects of S3 class "adoption"

level

integer. If level<=0 only a verbal description is given. If level=1 the important parameters of the models are returned. If level>1 simulation results for the models are also returned where they are available.

...

optional arguments that are ignored

give.attr

logical. If TRUE the attributes are also printed.

Value

print

The higher the level, the more details are printed. The print out is also returned within an invisible list. So, z <- print(adoption(), level=1) might make sense.

str

It uses essentially the basic str function. str returns NULL

Examples

Run this code
# NOT RUN {
RFoptions(cores=2)  ## see package RandomFieldsUtils

## only the model definitions and the simulation result for the
## first model (Bass, '_set_') are returned; no pictures are drawn
str(adoption(gui=FALSE, printlevel=0))

## pictures are drawn and the result returned by 'adoption' is
## reduced to most revelant information (level=1). 'print' also
## returns this information in a list
z <- print(adoption(gui=FALSE), level=1)
str(z, give.attr=FALSE)
# }

Run the code above in your browser using DataLab